package com.laoxu.demo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.util.Date;

/**
 * @Description: 用户实体
 * @Author laoxu
 * @Date 2019/12/21 9:56
 **/
@ApiModel(value="User对象", description="用户")
@Data
public class User {
    private int id;
    private String name;
    private String city;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
    private Date birthday;

    public User(){}

    public User(int id, String name, String city, Date birthday) {
        this.id = id;
        this.name = name;
        this.city = city;
        this.birthday = birthday;
    }
}
